home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1988 February / Ahoy_Magazine_88-02_1988_Double_L.d64 / Line Locator 64 (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1988-01-01  |  440 b   |  14 lines

  1. 0 print"[147]"tab(13)"line locator"
  2. 1 rem ==================================
  3. 2 rem    commodares problem #46-3 :
  4. 3 rem      line locator
  5. 4 rem    solution by
  6. 5 rem      craig ewert
  7. 6 rem ====== c-64 only =================
  8. 10 ad=2049 : input"line sought";l : if l<0 then end
  9. 20 lp=peek(ad)+256*peek(ad+1) : ln=peek(ad+2)+256*peek(ad+3)
  10. 25 rem  print ad,lp,ln
  11. 30 if l<ln or lp=0 then print"line"l"does not exist":goto 10
  12. 40 if l=ln then print"line"l"starts at"ad:goto 10
  13. 60 ad=lp : goto 20
  14.